home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Forever 4
/
Atari Forever 4.zip
/
Atari Forever 4.iso
/
SERIE_AI
/
AI_074
/
MPLYR215
/
SLIDSHOW.DOC
< prev
Wrap
Text File
|
1998-03-14
|
9KB
|
252 lines
M_PLAYER: SLIDE-SHOWS and MOVIE-MAKER section
¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
How to run a slideshow?
¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
Just choose your batch file instead of an animation (please, keep
BAT as the batch extension).
How to run a mov-maker?
¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
It's the same as before, but the batch file must contain the line
'o=file_path' to know witch file to create. If you simply clic on 'Go!', it
will act as a slide-show, to get the Mov-Creation, you must use the key
'Alt' while clicking on the 'Go!' button. Easy, no?
How to create a BATCH FILE for a SLIDESHOW?
¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
A batch file is a simple ascii text files that contains 3 parts:
- the identifier
- the header
- the datas
Only the first line must start ont the leftmost row, for the
others, spaces and tab to indent are allowed, there must be only one
command per line, lines starting with ';' are considered as comments.
The size of the file is limited to 12488 bytes (I think it's
enough...).
The identifier
¨¨¨¨¨¨¨¨¨¨¨¨¨¨
It must be on the first line, first character and is always:
M_PLAYER or m_player (or m_PlAYer if you prefer!)
The header
¨¨¨¨¨¨¨¨¨¨
Starts on the second line (or after some comments lines) and gives
general infos on the slideshow:
w=xxxx the width of the movie
h=xxxx the height of the movie
c=xxxx the compression (the type of file):
tga2 for TGA 2 uncompressed (24 or 16 bits)
ximg for IMG with 'XIMG' extension and 256 colors
b=xxxx size of the buffer to load the entire largest image file
Those first 4 infos can't be ommited! The following can (for a
slide show, but must appear for a MOV-create):
t=xxxx time for one frame (number of 1/200sec)
f=xxxx number of frames in the whole slideshow
o=file_path path and name of the file to create (MOV, RLE16
or RLE8 compression)
s=file_path path and name of the sound file to add to the MOV
(WAV or AVR, 8/16 bits, mono/stereo)
If 's=' is present, then 't=' is ignored and the frame rate is
computed according to the sound duration.
q=x quality, default value is 5 (5 bits per color), but you
can reduce it to 4,3,2 or even 1 to get a more efficient
compression, but with a lost of quality. I've tried 'q=2'
on some frames, it seems to be correct (better
compression, good quality). 'q=' is only useful when a MOV
is created, it fixes the number of signifiant bits to know
if the color of a pixel has changed or not.
k=xxxx specifies the rate of the key frames (for example, with
k=5, frames #5, 10, 15, 20 ... will be key frames). See
below: "Key frames use".
The order of those infos is not fixed, but you musn't put spaces
between the characters (w = 320 is wrong!).
The datas
¨¨¨¨¨¨¨¨¨
Starts immediately after the header with a key word:
data
Then, every line is read and:
if starting with a '.' --> it's a command, executes it
else --> it's the name of a file, displays it,
and its name becomes the current name.
commands are:
.rept xxxx
.endr
repeat xxxx times what's between rept and endr. Loops can
be nested.
.disp
displays the file corresponding to the current name
.getp
uses the palette of the next file (only applied with
palette based images). If '.getp' is not specified, then
the palette will be ignored (for example when all of the
frames share the same palette that is loaded once), this
speeds up the display when running in NOVA 256c (because
the palette must be passsed to the VDI).
.incr
increments a number found into the current name (example,
if name was: C:\IMAGES\FRM00001.TGA it becomes
C:\IMAGES\FMR00002.TGA)
.decr
same as above with a decrementation.
.stop
end of the slideshow. This command MUST appear, else the
program crashes.
.keyf
forces the next frame to be a key-frame (if k=xxxx is
used, then this auto key counter will be reset). See below
at "Key frames use".
Example of a BATCH FILE:
¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
(The comments starting with ** don't appear in the file!)
** start of file
M_Player ** Id
; comes from a FLI ** comment
w=320 ** width
h=200 ** height
; 67/200 means 3 f/s ** comment
t=67 ** time for one frame
f=29 ** number of frames
c=tga2 ** files are TGA 2 uncompressed
b=192018 ** size of one file (320x200x3 + 18)
data ** end of header/start of data
E:\imprimer\mou00001.tga ** first frame, display it
.rept 2 ** twice the whole
.rept 7 ** 7 times
.incr ** increment name of file (00002 to 00008)
.disp ** and display it
.endr ** loop
.rept 7 ** another 7 times
.decr ** dec name of file (00007 to 00001)
.disp ** and display it
.endr ** loop
.endr ** twice!
.stop ** end of slideshow
Well, this example has displayed:
mou00001.tga
mou00002.tga
...
mou00007.tga
mou00008.tga
mou00007.tga
...
mou00001.tga
And this twice! The images came from a FLI that I saved using the
Step by Step mode.
INCR and DECR commands can only work correctly if the names of the
files END with digits! (for example 00001BB.TGA won't work because it
ends with BB).
Another example:
¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
You can specify each file if you don't want to use commands:
M_PLAYER
w=184
h=240
b=50000
c=ximg ** t= ommited because there's a sound
f=5
o=C:\ANIM\US.MOV ** will create a MOV if Alt+GO
s=C:\SOUNDS\KISS.AVR ** will add this sound if Alt+GO
data
.getp ** supposing that all have the same
C:\IMAGES\ME.IMG ** palette, we load it once!
C:\IMAGES\YOU.IMG
C:\IMAGES\ME.IMG
C:\IMAGES\YOU.IMG
C:\IMAGES\ME_N_YOU.IMG
.stop
'.stop' is the only command that must appear.
Common errors (those I made...)
¨¨¨¨¨¨¨¨¨¨¨¨¨
* The header is built BEFORE adding the frames, so the number of
frames that you specify (f=xxxx) must be exact! Else you'll get a totally
corrupted MOV file. To ensure that it's the right value, launch a
slide-show before encoding, if total_frames=frames_displayed, it's Ok.
* this is the same for 'w=' and 'h='. Be sure that all of the
images have the same size, the one you specified.
* the 'supported' message into the graphic box is based upon your
'c=xxxx'. The program hasn't read a file to verify that, ensure that it's
the good fromat.
* The sound frequencies accepted are those from the PC world:
11025, 22050 and 44100 KHz, or the closest possible to them. Else, you get
an 'Unsupported' message in the sound box.
* if using IMG images you get the RLE8 compression that uses a
palette. But, the MOV can contain only ONE palette, so you must be sure
that all the images share the same colors, else, it's the last palette
read (with .getp) that will be saved.
Key-Frames use
¨¨¨¨¨¨¨¨¨¨¨¨¨¨
Here is a brief introduction to the utility of inserting
key-frames into a movie. There are two cases:
- your machine is fast and no frame will be skipped when playing,
then you don't need to use the key frames.
- your machine isn't so fast and there may be some frames skipped,
the use of key-frames is highly recommended!
What happens when a frame is skipped?
In order to increase the compression, only the differencies
between two frames are stored, this means that one frame is only a partial
display. If one frame is skipped (because of the synchronisation) the next
one won't have the background expected! You'll get a wrong display.
A key frame is used to solve this problem, it is a complete
reconstruction of the screen. So, when a frame is skipped, M_PLAYER just
has to wait for the next key-frame to go on displaying.
An example:
Suppose you have used k=5 and t=40 (5 frames per second) into the
header and that your machine can only display 3 images /second. Here is
what will happen:
second #1: frames 1,2,3
second #2: frames 5,6,7
second #3: frames 10,11,12
etc...
Every key frame will be at its exact position (in time), and
between 2 key-frames, the player does as much as it can. If you play this
same movie with a faster machine, you'll get maybe:
second #1: frames 1,2,3,4
second #2: frames 5,6,7,8
second #3: frames 10,11,12,13
etc...
And with a very fast machine, you'll get every frame.
The best is to put 2 key-frames per second, this way, the display
will be synchro with the sound twice a second.
You must know that a key frame is larger than a normal one,
because it rebuilds every pixel, and that inserting too few key-frames
will lead to a poor synchro quality. It's a question of balance. Make some
tests to find the best solution.
Idea: it's a good idea to choose the frames where the background
changes suddenly, because anyway most of the pixels will be rebuilt!